
The XFCustom Sample


----------------------------------------------------------------------------
Purpose
----------------------------------------------------------------------------

The purpose of this sample is to demonstrate how to use a dialog, from a
resource DLL, with your X-Function and also how to distribute such an
X-Function in an Origin Package (.OPX file).



----------------------------------------------------------------------------
Files
----------------------------------------------------------------------------

XFCustom\
  ReadMe.txt ........... this file
  myCustomXFDlg.h ...... Origin C header containing the dialog code
  myCustomXFDlg.OXF .... the X-Function made with X-Function Builder
  XFCustom.h ........... DLL resource header
  XFCustom.OPX ......... Sample OPX for distributing XF that uses custom
                         dialog DLL and a header file.

  ResDLL\
    XFCustom.dsp ..... Visual C++ project for making the DLL
    XFCustom.rc ...... DLL resource



----------------------------------------------------------------------------
Installation
----------------------------------------------------------------------------

- Open the .DSP file in Visual Studio/C++
- Build the DLL
- Copy the DLL and the myCustomXFDlg.h to the OriginC\X-Functions\ subfolder
  in your Origin User Files folder.  If the subfolders do not exist then
  you will have to create them.
- Drag-and-Drop the .OXF file on to Origin.  Origin will install the OXF
  into the X-Functions subfolder of your User Files folder.  Origin will
  create any necessary subfolders.



----------------------------------------------------------------------------
Creating the Origin Package (.OPX file)
----------------------------------------------------------------------------

If you want to share your X-Function and custom dialog you can distribute
the files in an Origin Package.

In Package Buider you add your X-Function file (.OXF), your resource DLL,
and your Origin C header file containing the class that handles the dialog.

All three files should be in your User Files folder.

The XFCustom sample comes with a sample OPX file that contains the needed
files for sharing the XFCustom DLL, XF, and header file.
